import request from '@/utils/request'

// 查询生产损耗列表
export function listProductinventory(query) {
  return request({
    url: '/productinventory/productinventory/list',
    method: 'get',
    params: query
  })
}

// 查询生产损耗详细
export function getProductinventory(productionInventoryId) {
  return request({
    url: '/productinventory/productinventory/' + productionInventoryId,
    method: 'get'
  })
}

// 新增生产损耗
export function addProductinventory(data) {
  return request({
    url: '/productinventory/productinventory',
    method: 'post',
    data: data
  })
}

// 修改生产损耗
export function updateProductinventory(data) {
  return request({
    url: '/productinventory/productinventory',
    method: 'put',
    data: data
  })
}

// 删除生产损耗
export function delProductinventory(productionInventoryId) {
  return request({
    url: '/productinventory/productinventory/' + productionInventoryId,
    method: 'delete'
  })
}


// 审核生产损耗
export function auditProductInvenory(data) {
  return request({
    url: '/productinventory/productinventory/audit',
    method: 'put',
    data: data
  })
}




// 审批生产损耗
export function approverProductInvenory(data) {
  return request({
    url: '/productinventory/productinventory/approver',
    method: 'put',
    data: data
  })
}